package com.atguigu.guli.service.educms.controller;

import com.atguigu.guli.service.base.result.R;
import com.atguigu.guli.service.educms.entity.CrmBanner;
import com.atguigu.guli.service.educms.service.CrmBannerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@CrossOrigin
@RequestMapping("/educms/frontbanner")
public class CrmBannerFrontController {
    @Autowired
    CrmBannerService bannerService;

    @GetMapping("/list")
    public R getList(){
        List<CrmBanner> list = bannerService.selectList();
        return R.ok().data("list",list);
    }

}
